﻿@model IEnumerable<prohomework.Models.studenthomeworkIndex>

@{
    ViewBag.Title = "Index";
}

<h2>学生作业管理</h2>
    班级：@ViewData["classname"]    课程名称：@Html.DropDownList("courselist", ViewData["courselist"] as IEnumerable<SelectListItem>)
<table  class="table table-bordered table-striped .active .table-condensed " style="width:100%;text-align:center">
    <tr>

        <th>
            次号
        </th>
        <th>
            作业名称
        </th>
        <th>
            发布时间
        </th>
        <th>
            截止时间
        </th>
        <th>
            状态
        </th>
        <th>
            操作
        </th>

    </tr>

    @foreach (var item in Model)
    {

        <tr>

            <td>
                @Html.DisplayFor(modelItem => item.cehao)
            </td>
            <td>
                @if (item.checkstudenthomework)
                { @Html.ActionLink(item.zuoyemingchen, "showwork", new { workid = item.homeworkID }); }
                else
                { @Html.ActionLink(item.zuoyemingchen, "homeworkShow", new { workid = item.homeworkID }, new {target="_blank"});}
               
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.publishdate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.edndate)
            </td>
 
                @if (item.checkstudenthomework)
                {
                    <td>完成</td>
                    <td>@Html.ActionLink("修改", "modiworknew", new { id = item.homeworkID, biaoshi = 1 }, new { @role="button"})</td>

                }
                else if (!item.checkdatetime)
                {
                    <td>已过期</td>
                    <td></td>
                }
                else
                {
                    <td>未完成</td>
                        <td>@Html.ActionLink("交作业", "doworknew", new {id = item.homeworkID,biaoshi=2 })</td>
                }

            @*        <td>
                    @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
                    @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
                    @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
                </td>*@

        </tr>
    }

</table>